package model.command;
import controller.KeyListeners.KeyListenerSet;
import model.playable.RallyPoint;
/**
 * Defines traits common to all key listeners.
 *
 * @author joseph
 */
public  abstract class RallyPointCommand extends Command implements NumberCommand{
    private int numWorkers;
    private RallyPoint rallyPoint;
    /**
     * Initiates this  rally point command
     * 
     * @param listeners             The listeners availible to this rally point command
     * @param rallyPoint            The number of workers required to complete this rally point command
     */
    public RallyPointCommand(RallyPoint rallyPoint){
        super();
        setRallyPoint(rallyPoint);
        setNumWorkers(1);
    }
    @Override
    public void attachToListener() {
        getListeners().attachToNumberListener((NumberCommand)clone());
    }
    /**
     * 
     * @return
     */
    public int getNumWorkers(){
        return numWorkers;
    }
    /**
     * 
     * @return
     */
    public RallyPoint getRallyPoint(){
        return rallyPoint;
    }
    public void recieveNumber(int numWorkers){
        this.numWorkers = numWorkers;
    }
    public void setNumWorkers(int numWorkers){
        this.numWorkers = numWorkers;
    }
    private void setRallyPoint(RallyPoint rallyPoint){
        this.rallyPoint = rallyPoint;
    }

}
